package com.example.demo01.utils;

import android.content.Context;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.example.demo01.R;

public class ToastUtil extends AppCompatActivity {

    static Context context; // 上下文

    public ToastUtil(Context context) {
        ToastUtil.context = context;
    }

    public void showToast(String content) {
        Toast.makeText(context, content, Toast.LENGTH_SHORT).show();
    }

}
